import request from "@/utils/request";
export function fetchList(params) {
  return request({
    url: "/qsg/gatewayDevice/list",
    method: "get",
    params: params,
  });
}

export function createGatewayDevice(data) {
  return request({
    url: "/qsg/gatewayDevice/create",
    method: "post",
    data: data,
  });
}

export function deleteGatewayDevice(id) {
  return request({
    url: "/qsg/gatewayDevice/delete/" + id,
    method: "get",
  });
}

export function getGatewayDevice(id) {
  return request({
    url: "/qsg/gatewayDevice/" + id,
    method: "get",
  });
}

export function updateGatewayDevice(id, data) {
  return request({
    url: "/qsg/gatewayDevice/update/" + id,
    method: "post",
    data: data,
  });
}

export function addDeviceToGateway(id){
    return request({
        url: "/qsg/gatewayDevice/addDeviceToGateway/" + id,
        method: "get",
    });
}
